home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tpe34.zip / TPE.DOC < prev    next >
Text File  |  1992-04-06  |  101KB  |  2,092 lines

  1.  
  2.                           TPE: Turbo Powered Editor
  3.                                  Version 3.4
  4.                                  Brian Foley
  5.                              TurboPower Software
  6.                                  April 1992
  7.  
  8.  
  9. Introduction
  10. ------------------------------------------------------------------------------
  11.  
  12. TPE is a programmer's editor that we at TurboPower Software developed for our
  13. own use. TPE was created initially by fusing together parts of two editors in
  14. Borland's now defunct Editor Toolbox: FirstEd and MicroStar. Over time,
  15. however, TPE has evolved into a fairly distinctive program. The basic
  16. architecture remains largely the same, but the list of features has changed
  17. substantially. We'll get to those in a moment.
  18.  
  19. TPE was developed primarily for our own use, and for the most part it remained
  20. "our little secret" for roughly three years. We gave it to various friends and
  21. acquaintances during that time, however, and many of them became overnight
  22. converts. "Why don't you put it on CompuServe?" they would ask. "We don't want
  23. to face the non-stop stream of requests for enhancements. Everyone has his own
  24. idea of how a text editor should work," we would reply. Or "Why don't you sell
  25. it?" they would ask. "We don't want to get into that market. We like the
  26. business we're in." And we still feel that way.
  27.  
  28. So why did we decide to release TPE to the public after all? The main reason
  29. is that an awful lot of Turbo Pascal programmers we talk to seem to need it,
  30. or at least something like it. Many really like the Turbo Pascal IDE, the ease
  31. with which they can go from editing to compiling to debugging, but they are
  32. increasingly feeling cramped by the program's memory requirements. Many also
  33. like the alternative IDE in our Turbo Analyst package, but feel constrained by
  34. the limitations of its editor. These are problems that we just don't face
  35. ourselves, and the simple reason is that we use TPE for almost everything we
  36. write. We finally decided that it just wasn't right to keep it to ourselves
  37. any more. So here it is.
  38.  
  39. Since the list of features in TPE is indeed long, we'll just hit on some of
  40. the highlights here:
  41.  
  42.    - Virtual memory management (optional) allows editing of files larger than
  43.      will fit into memory
  44.    - Up to eight zoomable and resizable windows for editing multiple files
  45.      or different parts of a single file
  46.    - Swapping exec function--TPE uses only 4K of memory while executing DOS
  47.      commands or other programs
  48.    - Hotkey access to compilers (up to 5), assembler, and debugger
  49.    - Recognizes compiler errors generated by Turbo Pascal (TPC, TPCX, TPCW),
  50.      Turbo Assembler (TASM), Macro Assembler (MASM), and Borland C++ (BCC,
  51.      BCCX) and moves cursor to position of the error
  52.    - Maintains list of 20 most recently edited files and allows easy retrieval
  53.      of them
  54.    - Support for EGA 43-line, VGA 50-line, and user-defined text modes
  55.    - Synchronized scrolling option for comparing the contents of two windows
  56.    - Cut and paste between windows
  57.    - WordStar-compatible command structure
  58.    - Fully configurable keyboard
  59.    - Word wrap, smart tabs, fixed tabs, autoindent mode
  60.    - Keyboard macro system, search-and-apply-macro command, ability to create
  61.      self-repeating and self-aborting macros
  62.    - Text markers
  63.    - Undo command
  64.    - Four line-drawing modes
  65.    - Solid (block) cursor option
  66.    - Commands for indenting, aligning, and reformatting blocks of text
  67.    - Brace-matching commands for finding mismatched comment braces,
  68.      parentheses, brackets, etc.
  69.  
  70. In comparison with the best known commercial programmer's editors, TPE really
  71. lacks only two things: 1) It does not have a full undo facility, just a simple
  72. undelete function, and 2) its macro system is fairly simplistic.
  73.  
  74. On the other hand, TPE has the three F's: it's Fast, Flexible, and Free.
  75.  
  76.  
  77. What's New in TPE 3.0
  78. ------------------------------------------------------------------------------
  79.  
  80. Version 3.0 offers a multitude of enhancements over version 2.x. The following
  81. is a concise list of the things that are new and different in 3.0. Most of
  82. these items are described in greater detail elsewhere in the documentation.
  83.  
  84.   - now includes virtual memory manager to allow editing of files larger than
  85.     will fit into memory; select the source of virtual memory in TINSTALL or
  86.     with command line option
  87.   - now allows you to define up to 5 compilers; select the one you want to use
  88.     by pressing <ShF5> until its name appears on the status line
  89.   - can now swap to XMS as well as EMS and disk when executing other programs
  90.   - now uses separate file (TPE.CFG) for storing configuration data, allowing
  91.     TPE.EXE to be compressed; CFG file can optionally be updated on exit
  92.   - new <AltF5> command to display user screen
  93.   - now traps compiler errors generated by Turbo Pascal, TASM, MASM, and
  94.     Borland C++ and moves the cursor to the position of the first error or
  95.     warning
  96.   - now has option to pause after executing the primary file
  97.   - now has option to save all modified files before executing a DOS shell
  98.   - now has option to assemble the file in the current window (rather than the
  99.     primary file, so that you don't have to change the primary file in order
  100.     to assemble the file you're editing)
  101.   - now lets you specify (via TINSTALL) a user-defined video mode that you can
  102.     use by default or switch in and out of with <AltT><AltU>
  103.   - now offers a "synchronized scrolling" option, activated with <AltS><AltS>,
  104.     which causes all visible windows to scroll in unison when a cursor
  105.     movement command is issued
  106.   - now maintains a file "reload list" containing the last 20 files that you've
  107.     edited, the location of the cursor when the window was closed, and the
  108.     options that were set for the window; <CtrlF3> allows you to load a file
  109.     from the list into a new window, and <ShF3> lets you load a file from the
  110.     list into the current window; reload list also stores primary file setting
  111.   - the reload list is saved automatically in TPE.RLL, either in the current
  112.     directory or in the support path, when you exit (optional)
  113.   - if the reload list was saved, you can use 'TPE /L' to reload the last file
  114.     you edited, or 'TPE /A' to reload all files that were open when you last
  115.     exited from TPE; specifying either /L or /A will also restore your primary
  116.     file setting
  117.   - you can now specify up to 8 filenames on TPE's command line (old limit
  118.     was 3); you can also now specify a command line parameter that indicates a
  119.     line number to jump to following the filename
  120.   - other command line parameters let you select the video mode to use while
  121.     editing or request use of black-and-white video attributes; use "TPE /?"
  122.     to see a list of available command line options
  123.   - new option to change format of status line so that it displays total
  124.     number of lines in the file rather than the absolute position of the
  125.     cursor within the file
  126.   - now lets you set default search options with TINSTALL
  127.   - now lets you specify printer initialization/reset strings
  128.   - the <CtrlLeft> and <CtrlRight> commands in the prompt editor are now
  129.     consistent with those in TPE itself
  130.   - directory list now supplies '..' if necessary when displaying
  131.     subdirectories on Netware drives
  132.   - now has command line option to allow editing of UNIX files
  133.  
  134. TPE 3.1
  135. ------------------------------------------------------------------------------
  136.  
  137. TPE 3.1 is a maintenance release that fixes a couple of bugs/problems in 3.0:
  138.  
  139.   - The option to compress spaces to tabs when writing files to disk did not
  140.     work properly, and caused data to be lost.
  141.   - In one particular case, the display wasn't updated correctly when using
  142.     the <AltF3> command when the current window was zoomed.
  143.   - 3.0 didn't work very well with Borland C++, whose compilers (BCC and BCCX)
  144.     expect the compiler options to be specified before the filename rather
  145.     than after. TPE now offers two ways to handle this problem. First, if the
  146.     abbreviation for the compiler being used starts with 'BCC', TPE will
  147.     automatically insert the compiler options before the filename. Second, if
  148.     the first character in the compiler options string is a less than sign
  149.     ('<'), TPE will remove that character from the string of options and
  150.     insert them before the filename.
  151.  
  152. One user's suggestion was also incorporated into 3.1. When a compiler error
  153. occurs, you no longer have to press <Esc> to get rid of the error message. The
  154. message is now displayed until a key is pressed or 15 seconds elapse,
  155. whichever comes first.
  156.  
  157. Also, TPE.LZH now includes a tiny TSR called VEGATRAP.COM that allows TPE's
  158. user-defined video mode feature to work with VEGA VGA cards, which use a
  159. proprietary video BIOS call to activate special text modes (such as 132-column
  160. modes).
  161.  
  162.  
  163. TPE 3.2
  164. ------------------------------------------------------------------------------
  165.  
  166. TPE 3.2 is primarily a maintenance release (internal) that fixes a couple of
  167. bugs/problems in 3.x:
  168.  
  169.   - In some cases TPE failed to display the last line in a file if it did not
  170.     contain a CR/LF.
  171.   - Fixed lingering problems with the option to compress spaces to tabs when
  172.     writing to disk.
  173.  
  174. New features:
  175.  
  176.   - A "%x%" directive has been added to go along with "%p%" to allow macros to
  177.     exec the executable file associated with the primary file. See the entry
  178.     for the Invoke DOS shell command, below.
  179.  
  180. TPE 3.3
  181. ------------------------------------------------------------------------------
  182.  
  183. TPE 3.3 is another maintenance release (public) that fixes a couple of
  184. bugs/problems in 3.x:
  185.  
  186.   - TPE did not deal properly with compiler errors in Turbo Pascal units with
  187.     unit names longer than 8 characters.
  188.   - An extraneous blank was being added to the parameters passed to a compiler
  189.     or assembler.
  190.  
  191. Enhancements:
  192.  
  193.   - Added /C command line option to allow specification of an alternate CFG
  194.     file.
  195.  
  196. TPE 3.4
  197. ------------------------------------------------------------------------------
  198.  
  199. TPE 3.4 is a maintenance release that fixes a bug in 3.x:
  200.  
  201.   - When compressing spaces to tabs, TPE did not deal properly with lines in
  202.     which there were an odd number of quotation marks
  203.  
  204. Enhancements:
  205.  
  206.   - Added /R command line option, which invokes the reload list when the
  207.     program first starts
  208.   - Expanded reload list from 8 entries to 20
  209.  
  210. Installing TPE with TINSTALL
  211. ------------------------------------------------------------------------------
  212.  
  213. Before using TPE, you will want to run the installation program that comes
  214. with it, TINSTALL. There are MANY configuration options available in TINSTALL,
  215. but only a few are truly important, so we'll cover those first.
  216.  
  217. When you load TINSTALL, you'll be presented with a scrollable data entry
  218. screen that displays several basic configuration options. Most of the ones
  219. we're interested in now are on subsequent pages. To get to one you can't see
  220. at first, press either <Down> or <PgDn>.
  221.  
  222. The following are the configuration options you should set initially:
  223.  
  224.   Configuration option                     Default setting (if any)
  225.   ---------------------------------------- -----------------------------------
  226.   Directory for supporting files
  227.     This setting determines where TPE will look for its help file (TPE.HLP),
  228.     its standard macro file (TPE.MAC), and (by default) its reload list file
  229.     (TPE.RLL). Typically this will be the drive:\directory containing TPE.EXE
  230.     and TPE.CFG.
  231.  
  232.   Source of virtual memory for editing     RAM
  233.     This setting determines the source of memory to be used to store text
  234.     being edited. By default, TPE uses normal RAM, but you can also select
  235.     EMS, XMS, or Disk here. If the desired source of virtual memory is not
  236.     available, or is too limited to be of use, TPE will display an error
  237.     message when it starts and use normal RAM instead. We generally advise use
  238.     of Disk space for virtual memory only if you have a large (1-2 megabyte)
  239.     disk cache installed. See the section on TPE's Virtual Memory Manager,
  240.     below, for additional information about this feature.
  241.  
  242.   Printer to use                           LPT1
  243.     You can choose LPT1, LPT2, LPT3, COM1, or COM2. This setting is important
  244.     only in the sense that you can't print with TPE if it is wrong.
  245.  
  246.   Name of swap file                        $TPE$.SWP
  247.     This option is important only if your machine lacks EMS/XMS, or if you
  248.     don't have enough EMS/XMS for TPE to use it when swapping itself out
  249.     before executing other programs. (The amount of EMS/XMS needed varies
  250.     depending on the number of files loaded, etc., but at least 250K is needed
  251.     in all cases, more if EMS/XMS is being used by the virtual memory
  252.     manager.) The default filename is fine, but you will probably want to
  253.     specify a complete pathname, so that the swap file will always be in the
  254.     same place.
  255.  
  256.   Compiler 1
  257.   Name of compiler                         TPC   C:\TP6\TPC.EXE
  258.   Primary options                          /M /$D- /$L- /L
  259.   Secondary options                        /M /$D+ /$L+ /L /V
  260.     These let you specify the complete pathname for your primary compiler and
  261.     any command line options that should be sent to it, as well as an
  262.     abbreviation of up to 4 letters that uniquely identifies this compiler.
  263.     This abbreviation will be displayed on the status line when this compiler
  264.     is the default compiler. The two sets of options correspond to two
  265.     different Compile program commands in the editor, allowing you to easily
  266.     alternate between compiling with or without debug information. Note that
  267.     you can specify up to four other compilers for TPE to use (Compilers 2-5).
  268.     TINSTALL also lets you select a Default compiler (normally Compiler 1),
  269.     and TPE lets you switch compilers dynamically by pressing <ShF5>.
  270.  
  271.   Pathname for assembler                   C:\TASM\TASM.EXE
  272.   Options for assembler
  273.   Assemble file in current window          Y
  274.     These let you specify the complete pathname for your assembler and any
  275.     command line options that should be sent to it. If the Assemble file in
  276.     current window option is set to Y, TPE will pass the name of the file in
  277.     the current window to the assembler; if it is set to N, TPE will pass the
  278.     name of the primary file.
  279.  
  280.   Pathname for debugger                    C:\TD\TD.EXE
  281.   Options for debugger
  282.     These let you specify the complete pathname for your debugger and any
  283.     command line options that should be sent to it.
  284.  
  285. Of the remaining configuration options, only a couple require detailed
  286. explanations, so we'll go over those next.
  287.  
  288. On the third page of configuration options, you'll find a section labelled
  289. "Video attributes". The options in this section let you change the colors used
  290. by TPE. There are two sets of colors: one for color systems, the other for
  291. monochrome adapters and color adapters running in a black-and-white video mode
  292. (BW80). These are the color settings and what they mean:
  293.  
  294.   Attribute                                Color   Mono
  295.   ---------------------------------------- ------- ---------------------------
  296.   Text                                     1E      07
  297.     Ordinary text within an editing window.
  298.  
  299.   Marked blocks                            1B      0F
  300.     Color used to highlight marked blocks. Also used to display control
  301.     characters embedded in the text.
  302.  
  303.   Text markers                             5F      09
  304.     Color used to display text markers (sometimes called bookmarks).
  305.  
  306.   Highlighted search text                  4F      70
  307.     Color used to temporarily highlight text found in a search operation.
  308.  
  309.   Window status line                       2F      70
  310.     Color used for each window's status line.
  311.  
  312.   Command line                             0B      07
  313.     Color used for the command line at the top of the screen.
  314.  
  315.   Block cursor                             4F      70
  316.     Color used for a solid (non-blinking) block cursor.
  317.  
  318.   Menu items (unselected)                  3F      07
  319.     Color used for unselected items in a menu (filenames in a directory list,
  320.     for example).
  321.  
  322.   Menu items (selected)                    3F      0F
  323.     Color used to highlight a selected item in a menu.
  324.  
  325.   Menu items (alternate)                   4F      70
  326.     Alternate color used for unselected items in a menu (directory names in a
  327.     directory list, for example).
  328.  
  329.   Menu frame                               3E      0F
  330.     Color used for the frame around a menu/pick list.
  331.  
  332. When the cursor is on one of these fields, the line at the top of the screen
  333. will change colors to give you a sample of the current color setting for that
  334. particular item.
  335.  
  336. There are two ways to change one of these colors. If you know the hex value
  337. for the color you want, you can just enter it. For example, for white text on
  338. a red background, you'd enter "4F". The easier way is to press <F10> and
  339. select the color you want with the cursor keys. When you've got the correct
  340. color highlighted, press <Enter>.
  341.  
  342. The next option that requires special comment is the very first one on the
  343. second page of options, Modify key assignments. When you press <Enter> with
  344. the cursor on this field, a new window will appear that shows all the commands
  345. in TPE and the keys they are assigned to.
  346.  
  347. To change or add a key assignment, move the highlight bar to the one you want
  348. to modify and press <Enter>, then press the key(s) you want to assign the
  349. command to. While entering a key assignment, the following commands are
  350. available:
  351.  
  352.   <BkSp>, <CtrlBkSp>
  353.   Delete last key
  354.  
  355.   <CtrlC>, <CtrlY>
  356.   Clear the key assignment
  357.  
  358.   <CtrlR>, <CtrlQ><L>
  359.   Restore the previous value
  360.  
  361.   <Enter>
  362.   Accept key assignment
  363.  
  364.   <Esc>, <CtrlBreak>
  365.   Cancel the operation
  366.  
  367. If you need to enter one of these keys as part of the key assignment, press
  368. <ScrollLock> to switch to literal mode rather than command mode, enter the
  369. key(s), then press <ScrollLock> to switch back to command mode.
  370.  
  371. To accept any changes that you have made and return to the main entry screen,
  372. press <Esc> or <CtrlEnter>. TINSTALL will then check to make sure that there
  373. are no conflicts among the key assignments. If any conflicts are found, an
  374. error message will be displayed and the keys causing the conflicts will be
  375. highlighted. TINSTALL will not allow you to return to the main entry screen
  376. until you have resolved all conflicts. If you decide that you'd rather just
  377. leave the keys the way they were before you made your changes, you can press
  378. <CtrlR> to Restore the default settings, then press <Esc>.
  379.  
  380. The only other options that require special comment are the following:
  381.  
  382.   Configuration option                     Default setting
  383.   ---------------------------------------- -----------------------------------
  384.   Printer initialization string
  385.   Printer reset string                     ^L^M
  386.  
  387. These options allow you to specify special strings that are to be sent to the
  388. printer before and after text is sent to the printer. They require special
  389. comment only because any strings you may specify will typically need to
  390. contain control characters, such as <Esc>. To enter a control character into
  391. one of these strings, simply press <CtrlP> first. For example, to enter an
  392. <Esc> character, press <CtrlP><Ctrl[>. The default printer reset string simply
  393. sends a form feed and carriage return to the printer to eject the last page.
  394. If this isn't necessary for your printer, you should clear this string.
  395.  
  396. The rest of the options are fairly self-explanatory, so we'll give only a
  397. brief description of what they mean. Most of them correspond to TPE commands
  398. that we'll be discussing later.
  399.  
  400.  
  401.   Configuration option                     Default setting (if any)
  402.   ---------------------------------------- -----------------------------------
  403.  
  404. Configuration options
  405.  
  406.   File for virtual memory on disk          $TPE$.VMF
  407.     Specifies the name of the file that the virtual memory manager will use if
  408.     Disk is the source of virtual memory. If no directory is specified, the
  409.     file will be stored in the current directory.
  410.  
  411.   Amount of EMS/XMS to reserve (in KB)     0
  412.     This value specifies the amount of EMS or XMS (in kilobytes) that the
  413.     virtual memory manager is supposed to leave available for other programs.
  414.     Note that it always sets aside enough memory for the swapping exec
  415.     function to use EMS/XMS if you answer Yes to either the "Use EMS if
  416.     available" question or the "Use XMS if available" question" (see below).
  417.  
  418.   Save config data on exit                 N
  419.     If this option is on, the CFG file is updated automatically on exit.
  420.  
  421.   Save reload list on exit                 Y
  422.     If this option is on, the reload list is saved automatically on exit.
  423.  
  424.   Directory for reload list                Support path
  425.     This option lets you specify where you want the reload list stored when
  426.     you exit from TPE. By default, it's stored in the support path, but you
  427.     can also select Currrent dir, in which case you can maintain multiple
  428.     reload lists in multiple directories.
  429.  
  430. File options
  431.  
  432.   Create BAK files when saving             Y
  433.     If Yes, TPE will rename existing files with a BAK extension before
  434.     overwriting them.
  435.  
  436.   Expand tabs to spaces when reading       Y
  437.     If Yes, tab characters are expanded to spaces when reading in a new file.
  438.  
  439.   Compress spaces to tabs when writing     N
  440.     If Yes, spaces are compressed to tab characters when writing a file to
  441.     disk.
  442.  
  443.   Default extension for filenames          PAS
  444.     Extension to be applied to filenames when none is specified. If you don't
  445.     want one to be applied, leave this field empty.
  446.  
  447. Editing options
  448.  
  449.   Insert mode on by default                Y
  450.     If Yes, insert mode will be the default, else overtype mode.
  451.  
  452.   AutoIndent on by default                 Y
  453.     If Yes, autoindent mode is on by default.
  454.  
  455.   Word wrap on by default                  Y
  456.     If Yes, word wrap is on by default.
  457.  
  458.   Fixed tabs on by default                 N
  459.     If Yes, fixed tabs will be the default, else smart tabs.
  460.  
  461.   Compress lines before wrapping           Y
  462.     If Yes, excess white space will be compressed out of a line when wrapping.
  463.  
  464.   Default left margin                      1
  465.     Specifies the default left margin.
  466.  
  467.   Default right margin                     78
  468.     Specifies the default right margin.
  469.  
  470.   Default size for fixed tabs              8
  471.     Specifies the default spacing for fixed tabs.
  472.  
  473.   Indent level for marked blocks           2
  474.     This setting governs the behavior of the indent and unindent block
  475.     commands.
  476.  
  477.   Lines to reserve on undelete stack       20
  478.     Specifies the size of the stack used to store deleted lines.
  479.  
  480.   Default search options                   U
  481.     Default options to use for search and find-and-replace commands.
  482.  
  483. Window options
  484.  
  485.   Use block cursor when editing            Y
  486.     If Yes, a solid block cursor is used rather than a blinking cursor.
  487.  
  488.   Zoom windows by default                  N
  489.     If Yes, new windows will be zoomed when first opened.
  490.  
  491.   Use black and white video attributes     N
  492.     If Yes, TPE will use black and white (monochrome) video attributes, even
  493.     if a color adapter is detected.
  494.  
  495.   Status line format (bytes or lines)      Byte count
  496.     If this option is set to Byte count, the status line for each window will
  497.     display the absolute position of the cursor within the file. If it is set
  498.     to Total lines, the status line will instead display the total number of
  499.     lines in the file--e.g., "5 / 1024", where 5 is the current line number
  500.     and 1024 is the total number of lines in the file.
  501.  
  502. Screen options
  503.  
  504.   User-defined video mode specified        N
  505.     If Yes, you must specify a user-defined video mode in the next field. This
  506.     mode can be toggled on/off within TPE using <AltT><AltU>.
  507.  
  508.   User-defined video mode                  00
  509.     If the answer to the previous question is Yes, this field should specify,
  510.     using hexadecimal notation, the number of the video mode you want TPE to
  511.     use when the <AltT><AltU> command is issued. TPE is designed to work with
  512.     text modes that display anywhere from 40 to 132 columns, and virtually
  513.     any number of rows. Specifying 01 here, for example, will allow you to
  514.     activate 40x25 mode on any non-monochrome adapter. Specifying 55 here will
  515.     allow you to activate 132x25 mode on a VGA that uses the Paradise chip
  516.     set. Be forewarned that not all video cards that implement non-standard
  517.     text modes allow them to be activated using the standard BIOS Set video
  518.     mode function. If yours doesn't, you won't be able to use this facility in
  519.     TPE.
  520.  
  521.   Default to 43-/50-line mode (EGA/VGA)    N
  522.     If Yes, TPE will switch to 43-/50-line mode when the program first starts.
  523.  
  524.   Default to user-defined video mode       N
  525.     If Yes, TPE will switch to the user-defined video mode when the program
  526.     first starts.
  527.  
  528.   Suppress snow (CGA)                      Y
  529.     If Yes, TPE will try to suppress snow when writing to video memory on a
  530.     CGA card.
  531.  
  532. Exec options
  533.  
  534.   Default extension for executables        EXE
  535.     Normally this will be "EXE"; change it to "COM" only if you write mostly
  536.     programs that compile to COM files.
  537.  
  538.   Use EMS if available                     Y
  539.     If Yes, EMS is used for swapping if it is available.
  540.  
  541.   Use XMS if available                     Y
  542.     If Yes, XMS is used for swapping if it is available.
  543.  
  544.   Display "Swapping..." message            Disk
  545.     Determines whether or not a "Swapping" message is displayed when executing
  546.     other programs. If "Disk", it is displayed only when swapping to disk. If
  547.     "Always", it is displayed when swapping to disk, EMS, or XMS. If "Never",
  548.     it is never displayed.
  549.  
  550.   Save modified files before exec          N
  551.     If Yes, TPE will save all modified files before executing a DOS shell or
  552.     executing a program you specify. Note that this is always done when TPE
  553.     execs the compiler, assembler, debugger, or the program associated with
  554.     the primary file.
  555.  
  556.   Pause after running primary program      N
  557.     If Yes, you will be asked to press a key to return to TPE after it has
  558.     executed the program associated with the primary file. Note that you can
  559.     view the output of your program by pressing <AltF5> to display "the user
  560.     screen."
  561.  
  562.   Confirm parameters                       Y
  563.     If Yes, you will be given a chance to edit the command line sent to any
  564.     program being executed.
  565.  
  566. Compilers
  567.  
  568.   Default compiler                         1 (TPC)
  569.     Press <Space>, <+>, or <-> here to select the compiler you'll normally
  570.     want to use. Within TPE, you can change this setting with <ShF5>.
  571.  
  572.   Trap compilation errors                  Y
  573.     If Yes, TPE will attempt to identify errors reported by the compiler or
  574.     assembler, and to move the cursor to the position of the error. TPE
  575.     currently recognizes errors and warnings reported by recent versions of
  576.     Turbo Pascal (TPC and TPCX), Turbo Pascal for Windows (TPCW), Turbo
  577.     Assembler (TASM), Macro Assembler (MASM), and Borland C++ (BCC, BCCX).
  578.     You'll probably want to set this to N only if your default compiler is not
  579.     one of these. Note that in the case of compilers/assemblers that can
  580.     generate multiple errors and warnings, TPE will pay attention only to the
  581.     first error or warning still visible on the user screen. Press <AltF5> to
  582.     view any other error messages that were generated.
  583.  
  584.   Open new window for compile errors       Y
  585.     If Yes, TPE will open a new window when it detects a compiler error in a
  586.     file that is not currently loaded. If No, TPE will load the file into the
  587.     current window if it is not already loaded.
  588.  
  589. Assembler
  590.  
  591.   Name of assembler                        C:\TASM\TASM.EXE
  592.     Specify the complete pathname of your assembler (if any).
  593.  
  594.   Options for assembler
  595.     Specify the default options you want passed to the assembler. If you're
  596.     using MASM, you should specify ";" here if nothing else.
  597.  
  598.   Assemble file in current window          Y
  599.     If Yes, TPE will pass the assembler the name of the file in the current
  600.     window. If No, it will pass the name of the primary file.
  601.  
  602. Debugger
  603.  
  604.   Name of debugger                         C:\TD\TD.EXE
  605.     Specify the complete pathname of your debugger (if any).
  606.  
  607.   Options for debugger
  608.     Specify the default options you want passed to the debugger.
  609.  
  610. As you look at the default settings, you'll see that the program is configured
  611. for use with Turbo Pascal 6.0, Turbo Assembler, and Turbo Debugger. That
  612. doesn't mean it can't be used with other languages and tools, however. One of
  613. the most enthusiastic users of TPE is a C programmer, and another programs
  614. mostly in assembly language.
  615.  
  616. Now, when you have set the options the way you want them, press <CtrlEnter>.
  617. TINSTALL will then save any changes you have made by modifying (or creating)
  618. TPE.CFG, and it will write a new version of TPE.HLP that reflects the key
  619. assignments you have specified. Note that, if it doesn't yet exist, TPE.HLP
  620. will be created whether you have modified any configuration settings or not.
  621. If you haven't changed anything and you don't want TPE.HLP to be created, or
  622. if you want to cancel the changes you have made, press <Esc> to exit instead
  623. of <CtrlEnter>.
  624.  
  625.  
  626. Starting TPE
  627. ------------------------------------------------------------------------------
  628.  
  629. Now that you've got TPE installed for your system, you're ready to run the
  630. program. TPE expects a command line of the following form:
  631.  
  632.    TPE [Options] [FileName1] .. [FileName8]
  633.  
  634. That is, you may specify up to eight filenames on the command line. If you
  635. have given TPE a default extension to use ("PAS" is the default), it will
  636. apply it to these filenames if no extension is specified. For example, to edit
  637. MYPROG.PAS, you could enter either of the following
  638.  
  639.   tpe myprog
  640.   tpe myprog.pas
  641.  
  642. If you need to edit a file without an extension, add a period to the end of
  643. the name:
  644.  
  645.   tpe readme.
  646.  
  647. Although a filename may contain wildcards, TPE will ignore all filenames
  648. thereafter. That is, the following will work:
  649.  
  650.    tpe myprog myprog.inc *.doc
  651.  
  652. TPE would load MYPROG.PAS and MYPROG.INC into the editor, and it would then
  653. display a list of all files in the current directory with an extension of DOC.
  654.  
  655. This will not work, however:
  656.  
  657.    tpe *.pas myprog.inc *.doc
  658.  
  659. TPE would ignore everything after "*.pas".
  660.  
  661. If you don't specify any filenames as parameters, TPE will start by displaying
  662. a directory list. If there's a default extension, it will use that extension
  663. (e.g., "*.PAS"); if not, it will display all files in the directory (if memory
  664. allows). If you press <Esc> twice, TPE will create a "NONAME" file for you to
  665. edit, which you can rename later when you go to save the file.
  666.  
  667. TPE also recognizes the following command line options:
  668.  
  669.   /L         Reload last file (can be used multiple times)
  670.   /A         Reload all files
  671.   /R         Display reload list on startup
  672.   /Jnnn      Jump to line nnn. MUST follow a filename.
  673.   /E         Use EMS for virtual memory
  674.   /X         Use XMS for virtual memory
  675.   /D         Use disk for virtual memory
  676.   /N         Use normal RAM
  677.   /U         Use user-defined video mode
  678.   /43        Use EGA 43-line mode
  679.   /50        Use VGA 50-line mode (same as /43)
  680.   /BW        Use black and white (mono) video attributes
  681.   /UNIX      Edit UNIX files
  682.   /Cfilename Specifies CFG file to use
  683.   /?         Display this help screen
  684.  
  685. These options are fairly self-explanatory. /E, /X, /D, and /N allow you to
  686. specify the source of the memory to be used by the virtual memory manager,
  687. overriding the default setting selected with TINSTALL. /U, /43, and /50 let
  688. you specify the text mode to be used while editing. And /BW lets you request
  689. the use of black-and-white video attributes. You might use this when running
  690. TPE on a laptop.
  691.  
  692. The /J option lets you specify a line number to jump to:
  693.  
  694.    tpe myprog.pas /J750
  695.  
  696. would load MYPROG.PAS and move the cursor to line 750. This parameter should be
  697. used only if the previous parameter was an actual filename. If it wasn't a
  698. filename, the parameter will be ignored.
  699.  
  700. The /UNIX option should be specified when editing files intended to be used
  701. under UNIX. If this option is specified, TPE uses ^J (rather than ^M^J) as a
  702. line delimiter, and it does not append a ^Z to the ends of files it creates.
  703.  
  704. The /C option may be used to specify a special CFG file to use. You might use
  705. this option, for example, if you program in multiple languages, and you want
  706. to use one set of configuration options for one language and a different one
  707. for another.
  708.  
  709. /L and /A require some explanation. By default, when you exit from TPE, it
  710. writes the contents of its reload list to a file, TPE.RLL, either in the
  711. current directory or in the support directory. Just before doing so, it adds
  712. all files currently in memory to the reload list and marks them as loaded.
  713. The file above the current file is added first, and the current file is added
  714. last, at the top of the list. Now, if you start TPE with the /L option, it
  715. will automatically load the file that was current when you last exited and put
  716. the cursor right where it was. To load both that file and the one that was
  717. below it, use "TPE /L /L". To reload all files that were loaded at the time
  718. you exited, use "TPE /A". The windows won't necessarily be the same size or in
  719. the same place as they were, but the same files will be loaded (unless
  720. multiple windows were open onto the same file) and the cursor will be in the
  721. right place in each window. Note that specifying either /L or /A will also
  722. restore your primary file setting to what it was when you exited.
  723.  
  724. If the /R option is specified, the reload list will be displayed instead of a
  725. directory list if no files are specified, directly or indirectly, on the
  726. command line.
  727.  
  728.  
  729. TPE's Configuration File (TPE.CFG)
  730. ------------------------------------------------------------------------------
  731.  
  732. A few words about the TPE.CFG file are also in order here. TPE will normally
  733. look for it first in the current directory, then in the directory that TPE.EXE
  734. was loaded from (under DOS 3.x or higher), then in all directories on DOS's
  735. PATH. If it can't find it, it will display an error message and proceed to use
  736. the "factory default" settings.
  737.  
  738. Note, however, that if you need to run TPE.EXE from a network drive and have
  739. multiple users using it, each with his own TPE.CFG file, what you can do is
  740. have each user set an environment variable that specifies the directory where
  741. his copy of TPE is stored:
  742.  
  743.   SET TPE=C:\TPE
  744.  
  745. DO NOT specify the name of the configuration file, which is assumed to be
  746. TPE.CFG, just the drive and directory. This environment variable, if it
  747. exists, will be used only to locate TPE.CFG. (TINSTALL does not check for the
  748. existence of this environment variable, incidentally, only TPE.)
  749.  
  750. Note too that, although it is possible to have multiple TPE.CFG files stored
  751. in multiple directories, we generally recommend that you maintain a single CFG
  752. file, preferably in the same directory as TPE.EXE. If you have multiple CFG
  753. files with different settings stored in various directories, the behavior of
  754. TPE will change depending on where you are when you load it. This could
  755. conceivably be desirable in certain cases, but it can also lead to confusion
  756. in others. For this last reason, we discourage the practice.
  757.  
  758. On the other hand, if you've selected the Save config data on exit
  759. option, and you're the kind of programmer who works on a variety of projects
  760. at once, each with its own directory, and you always change to the appropriate
  761. directory before working on that project, you may also prefer to maintain
  762. multiple CFG files, one in each of these directories. If so, you will probably
  763. also want to select the option to save the reload list in the current
  764. directory rather than the support path.
  765.  
  766. As of version 3.3, it is also possible to use the /C option to specify an
  767. alternate CFG file to be used. Because typing in the name of your CFG file on
  768. the command line is a bit cumbersome, you would probably want to use this
  769. option only in cases where another program is invoking TPE and is passing it
  770. pre-defined parameters.
  771.  
  772.  
  773. The Status Line
  774. ------------------------------------------------------------------------------
  775.  
  776. As indicated earlier, the top line of TPE's screen is used as a command line.
  777. It's where you respond to requests for search strings, filenames, etc., and it
  778. is also used to display messages. The remainder of the screen is used for the
  779. editing windows, up to 8 of them at a time. At the top of each window is a
  780. status line of the following form:
  781.  
  782. »SAVE« FILENAME.EXT Line nnnnnn Col nnn Byte nnnnnnnn TPC  INS ST AI WW * »ZOOM«
  783.  
  784. The "»SAVE«" indicator is present only when the file has been modified. If you
  785. are in a line-drawing mode, it will be replaced by a series of characters that
  786. indicate which of the four modes you are in (e.g., "─│┌┐└┘"). Or, if
  787. <ScrollLock> is on, "ScLock" will appear here instead, to indicate that the
  788. line drawing mode is being temporarily overridden.
  789.  
  790. "FILENAME.EXT" is the name of the file being edited. If you need to be
  791. reminded of its full pathname, use the <AltI> command. (If you are editing in
  792. a user-defined 132-column mode, the full pathname will be displayed here if
  793. possible.)
  794.  
  795. The next three slots on the command line indicate the position of the cursor
  796. relative to the beginning of the file. Note that if you have selected the
  797. Total lines option within TINSTALL, the format of the status line will be
  798. slightly different:
  799.  
  800. »SAVE« FILENAME.EXT Line nnnnnnn / nnnnnnn  Col nnn   TPC  INS ST AI WW * »ZOOM«
  801.  
  802. In this format, the "nnnnnnn / nnnnnnn" following Line means "Current line /
  803. Total lines".
  804.  
  805. "TPC" means that the default compiler is TPC.EXE. Use <ShF5> to select a
  806. different compiler.
  807.  
  808. "INS" means that you are in insert mode. "OVR" means that you are in overtype
  809. mode.
  810.  
  811. "ST" means that smart tabs are in use. "FT" means that fixed tabs are in use.
  812.  
  813. "AI" means that autoindent mode is in effect.
  814.  
  815. "WW" means that word wrap is on.
  816.  
  817. "*" indicates that snow-checking is on. It will never appear unless you have a
  818. CGA card.
  819.  
  820. "»ZOOM«" means that the current window has been zoomed. Three other messages
  821. can appear in this position: If the synchronized scrolling option is on,
  822. "∙SYNC∙" will appear here. If macro recording is on, "RECORD" will appear here
  823. instead. Or, if a macro is currently being played back, "MACRO!" will appear
  824. here until the macro is finished. (This visual reminder is useful because
  825. screen updates are suppressed while a macro is in progress.)
  826.  
  827. The next few sections provide descriptions of all the commands in TPE,
  828. arranged into categories. The one that you will probably find most useful at
  829. first is the help command, <F1>, which opens a new window, loads TPE.HLP into
  830. it, and then zooms the window. This file, created by TINSTALL, gives a
  831. complete list of all the commands (arranged pretty much as they are here) and
  832. the keys they are assigned to.
  833.  
  834. Basic Cursor Movement Commands
  835. ------------------------------------------------------------------------------
  836.  
  837. Character left                                   <Left>, <CtrlS>
  838. Cursor left one character.
  839.  
  840. Character right                                  <Right>, <CtrlD>
  841. Cursor right one character.
  842.  
  843. Word left                                        <CtrlLeft>, <CtrlA>
  844. Cursor left one word. A "word" is any sequence of characters delimited by
  845. one of the following characters: space, tab, carriage return, line feed,
  846. < > , . / ? ; : " [ ] { } - = \ + | ( ) % @ & ^ $ # ! ~. If the cursor is
  847. at the beginning of a line, it is moved to the end of the previous line.
  848.  
  849. Word right                                       <CtrlRight>, <CtrlF>
  850. Cursor right one word. If the cursor is at the end of a line, it is moved to
  851. the beginning of the following line.
  852.  
  853. Cursor to left side                              <Home>, <CtrlQ><S>
  854. Cursor to beginning of line.
  855.  
  856. Cursor to right side                             <End>, <CtrlQ><D>
  857. Cursor to end of line--i.e., the position following the last non-blank
  858. character on the line. Trailing blanks are always removed from all lines to
  859. preserve space.
  860.  
  861. Line up                                          <Up>, <CtrlE>
  862. Cursor up one line.
  863.  
  864. Line down                                        <Down>, <CtrlX>
  865. Cursor down one line.
  866.  
  867. Scroll up                                        <CtrlW>
  868. Scroll window up one line. The cursor will remain on the current line unless
  869. that line is at the bottom of the window.
  870.  
  871. Scroll down                                      <CtrlZ>
  872. Scroll window down one line. The cursor will remain on the current line unless
  873. that line is at the top of the window.
  874.  
  875. Page up                                          <PgUp>, <CtrlR>
  876. Scroll window up one page.
  877.  
  878. Page down                                        <PgDn>, <CtrlC>
  879. Scroll window down one page.
  880.  
  881.  
  882. More Cursor Movement Commands
  883. ------------------------------------------------------------------------------
  884.  
  885. Top of file                                      <CtrlPgUp>, <CtrlQ><R>
  886. Cursor to beginning of file.
  887.  
  888. End of file                                      <CtrlPgDn>, <CtrlQ><C>
  889. Cursor to end of file.
  890.  
  891. Top of window                                    <CtrlHome>, <CtrlQ><E>
  892. Cursor to top line of current window. The cursor remains in the same column.
  893.  
  894. Bottom of window                                 <CtrlEnd>, <CtrlQ><X>
  895. Cursor to bottom line of current window. The cursor remains in the same
  896. column.
  897.  
  898. Up to equal indent                               <CtrlJ><B>
  899. Moves the cursor to the beginning of the first previous line with the same
  900. indentation level as the current line. For example, if the first non-blank
  901. character in the current line is at column 20, the cursor is moved to the
  902. next line up that also begins at column 20.
  903.  
  904. Down to equal indent                             <CtrlJ><E>
  905. Moves the cursor to the beginning of the next line with the same indentation
  906. level as the current line.
  907.  
  908. Go to line                                       <CtrlJ><L>
  909. Prompts for a line number, then moves the cursor to the specified line. Any
  910. positive integer value in the range 1 to 32767 is valid. If the value is
  911. preceded by a plus (+) or minus (-) sign, the target line number will be
  912. calculated relative to the current line. If the target line number is greater
  913. than the number of lines in the file, the cursor will be moved to the last
  914. line in the file.
  915.  
  916. Go to column                                     <CtrlJ><C>
  917. Prompts for a column number, then moves the cursor to the specified column of
  918. the current line. Any positive integer value in the range 1 to 999 is valid.
  919. If the value is preceded by a plus (+) or minus (-) sign, the target column
  920. number will be calculated relative to the current column. If the target column
  921. is greater than 999 or less than 1, the command is ignored.
  922.  
  923. Go to byte                                       <CtrlJ><A>
  924. Prompts for an byte offset, then moves the cursor to the specified absolute
  925. offset within the file. If the value is preceded by a plus (+) or minus (-)
  926. sign, the target offset will be calculated relative to the current offset. If
  927. the target offset is greater than the number of bytes in the file, the cursor
  928. will be moved to the end of the file.
  929.  
  930. Previous cursor position                         <CtrlQ><P>
  931. Jump to the position the cursor was at before it was moved to the current
  932. line. This command is especially useful following a global search or replace
  933. operation.
  934.  
  935. Match braces forward                             <CtrlQ><[>
  936. This command may be used to locate a matching "brace" character or character
  937. pair. For example, if the cursor is on a '{' character, this command would
  938. move the cursor to the corresponding '}'. The following characters and
  939. character pairs may be matched:
  940.  
  941.       '    '          single quotes
  942.       "    "          double quotes
  943.       (    )          parentheses
  944.       [    ]          square brackets
  945.       <    >          angle brackets
  946.       {    }          Pascal-style comment braces
  947.       (*   *)         Pascal-style comments
  948.       /*   */         C-style comments
  949.  
  950. Note that this command accounts for nested braces. For example, if the cursor
  951. were on the first '(' in
  952.  
  953.    I := (X*(Y+Z));
  954.  
  955. the cursor would move to the ')' preceding the ';', not the one following the
  956. 'Z'. Although the name of the command implies that it always searches in a
  957. forward direction, in most cases the search direction is determined by the
  958. character that the cursor is on. For example, if it is on a '}', it will
  959. search backwards. The only exceptions are the single- and double-quote
  960. characters, cases in which the search direction cannot be inferred. This
  961. command will always search forward for a match in these cases.
  962.  
  963. Match braces backward                            <CtrlQ><]>
  964. This command is identical to the Match braces forward command, except in those
  965. cases where the cursor is on single- or double-quote character. In these
  966. cases, the command will always search backward.
  967.  
  968.  
  969. Insertion and Deletion Commands
  970. ------------------------------------------------------------------------------
  971.  
  972. New line                                         <Enter>
  973. In insert mode, this command inserts a line break at the position of the
  974. cursor; if autoindent mode is in effect, the cursor moves to the next line and
  975. to the same column as the first non-blank character in the previous line;
  976. otherwise, to column 1 of the new line. In overtype mode, this command moves
  977. the cursor to column 1 of the next line without inserting a new line, whether
  978. autoindent mode is in effect or not.
  979.  
  980. Insert line                                      <CtrlN>
  981. Inserts a line break at the position of the cursor without moving the cursor.
  982.  
  983. Insert control char                              <CtrlP>
  984. Allows control characters to be entered into the text. For example, pressing
  985. <CtrlP><CtrlG> would insert a ^G into the text (pressing <CtrlP><G> would
  986. insert a G). Control characters are always displayed as highlighted capital
  987. letters in the color used for marked blocks.
  988.  
  989. Delete current character                         <Del>, <CtrlG>
  990. Deletes the character under the cursor and moves any characters to the right
  991. of it one position to the left. This command does not work across line
  992. breaks.
  993.  
  994. Delete left character                            <Bksp>, <CtrlBksp>
  995. Moves the cursor one character to the left and deletes the character there.
  996. Any characters to the right of the cursor are moved one position to the left.
  997. If the cursor is at the beginning of a line, the current line will be joined
  998. with the previous line.
  999.  
  1000. Delete right word                                <CtrlT>
  1001. Deletes the word to the right of the cursor (see the definition of "word"
  1002. given above for the Word left command). This command works across line breaks
  1003. and thus may be used to remove line breaks.
  1004.  
  1005. Delete line right                                <CtrlQ><Y>, <F6>
  1006. Delete all text from the cursor to the end of the line.
  1007.  
  1008. Delete line                                      <CtrlY>, <CtrlF6>
  1009. Delete the current line.
  1010.  
  1011. Delete line (no undo)                            *none*
  1012. This command is the same as the Delete line command, but the deleted line is
  1013. not saved in the undo buffer. It is potentially useful when using the undo
  1014. buffer to temporarily store lines being moved.
  1015.  
  1016.  
  1017. Tab Commands
  1018. ------------------------------------------------------------------------------
  1019.  
  1020. Tab                                              <Tab>, <CtrlI>
  1021. Moves the cursor to the next tab stop. If insert mode is on, any text to the
  1022. right of the cursor is moved to the right of the tab stop. When fixed tabs are
  1023. in effect, the tab stops occur at 8-column intervals (by default). When smart
  1024. tabs are in effect (the default setting), the tab stops are determined by the
  1025. locations of the words on the previous line; the first character in each word
  1026. represents a tab stop.
  1027.  
  1028. Backward tab                                     <ShTab>
  1029. Moves the cursor to the previous tab stop. This command does nothing if smart
  1030. tabs are in effect.
  1031.  
  1032. Toggle fixed tabs                                <CtrlO><F>
  1033. Toggles the tab mode between smart tabs and fixed tabs.
  1034.  
  1035. Set tab size                                     <AltS><AltT>
  1036. Prompts the user for the number of columns between tab stops. The value
  1037. specified must be in the range 1..100.
  1038.  
  1039. Toggle tab expansion                             <AltT><AltT>
  1040. Activates or deactivates option to "expand" tab characters to spaces when
  1041. reading in files created with other editors. The assumed size of the tabs is
  1042. specified with the Set tab size command.
  1043.  
  1044. Toggle tab writing                               <AltT><AltW>
  1045. Activates or deactivates option to compress spaces to tab characters when
  1046. writing files to disk. The assumed size of the tabs is specified with the Set
  1047. tab size command. Note that TPE will not try to compress spaces within
  1048. quotation marks.
  1049.  
  1050.  
  1051. Undo Commands
  1052. ------------------------------------------------------------------------------
  1053.  
  1054. Restore line                                     <CtrlQ><L>, <ShF6>
  1055. Restore the original contents of the current line.
  1056.  
  1057. Undo last deletion                               <CtrlQ><U>, <AltU>
  1058. Used to restore whole lines deleted with the Delete line or Delete block
  1059. commands. It will not restore single characters or words. To "undo" your most
  1060. recent changes to the current line, use the Restore Line command. The size of
  1061. the "undo buffer" used to save deleted lines may be specified with the Set
  1062. undo limit command or with TINSTALL.
  1063.  
  1064. Insert undo buffer                               <CtrlQ><V>
  1065. Inserts the entire contents of the undo buffer into the current window just
  1066. prior to the current line. This command is intended primarily to be used in
  1067. macros.
  1068.  
  1069. Flush undo buffer                                <CtrlQ><J>
  1070. Empties the undo buffer. This command is intended primarily for use in
  1071. macros, in cases where you wish to use the undo buffer as a scratchpad.
  1072.  
  1073. Set undo limit                                   <AltS><AltU>
  1074. Allows you to set the size of the "undo buffer" used to store deleted lines.
  1075. The default value is 20 lines. The size of this buffer may also be set with
  1076. TINSTALL.
  1077.  
  1078.  
  1079. Search and Replace
  1080. ------------------------------------------------------------------------------
  1081.  
  1082. Find pattern                                     <CtrlQ><F>, <F4>
  1083. This command lets you search for any string of up to 67 characters. When you
  1084. enter this command, you will be prompted for a search string. The last search
  1085. string entered (if any) will be displayed as a default. You may select it
  1086. again by pressing <Enter>, edit it, or enter a new search string. <Esc> or
  1087. <CtrlU> will cancel a search command, and <CtrlP> may be used to enter control
  1088. characters: for example, to find a period at the end of a line, you would
  1089. enter <.><CtrlP><CtrlM>.
  1090.  
  1091. After the search string is entered, you are asked for search options. The
  1092. options you used last are displayed at first. You may enter new options, edit
  1093. the current options, or select them by pressing <Enter>. The following options
  1094. are available:
  1095.  
  1096.   B Search backward from the current position of the cursor toward the
  1097.     beginning of the file.
  1098.  
  1099.   G Search globally. The entire file is scanned for the search string,
  1100.     regardless of the current position of the cursor. The search starts at the
  1101.     beginning of the file if searching forward; at the end if searching
  1102.     backward.
  1103.  
  1104.   L Search only within the currently marked block.
  1105.  
  1106.   n Find the n'th occurrence of the search string. The search starts at the
  1107.     position of the cursor unless the L or G option is also specified.
  1108.  
  1109.   U Ignore case; treat all alphabetic characters as if they were in upper
  1110.     case.
  1111.  
  1112.   W Search for whole words only; skip matching patterns that are embedded in
  1113.     other words.
  1114.  
  1115. If the text contains a target matching the search string, the target is
  1116. highlighted and the cursor is positioned just beyond it.
  1117.  
  1118. Find and replace                                 <CtrlQ><A>, <F3>
  1119. This command allows you to replace one string of up to 67 characters with
  1120. another. You will be prompted first for a search string, next for a
  1121. replacement string, and finally for the search options. The valid options are
  1122. the same as those for the Find pattern command, with the following exceptions:
  1123.  
  1124.   N Replace without asking.
  1125.  
  1126.   n Make a maximum of n replacements. (Overridden by L option.)
  1127.  
  1128. If the text contains a target matching the search string, the target is
  1129. highlighted and the cursor is positioned just beyond it. You are then asked if
  1130. you wish to replace it. Press <Y> to replace it, <N> to ignore it, <A> to
  1131. replace it and all subsequent matches without asking, or <Q> to abort the
  1132. operation. If the N option was selected, this question will not be asked.
  1133.  
  1134. Search and apply macro                           <CtrlQ><M>
  1135. The Search and apply macro command lets you search for any string of up to 67
  1136. characters and then "apply a macro" to it: that is, move the cursor to the
  1137. location of the target, and execute the commands stored in the macro. Search
  1138. strings are entered in the same way that they are for the Find pattern
  1139. command. After the search string is entered, you are shown a menu containing
  1140. all of the macros you've defined. Move the highlight with the up and down
  1141. cursor keys, and select the macro to apply by pressing <Enter>. You can abort
  1142. the operation by pressing <Esc>.
  1143.  
  1144. Finally, you are prompted for options. The options you used last are
  1145. displayed at first. You may enter new options (canceling the old ones), edit
  1146. the current options, or select them by pressing <Enter>. All the options
  1147. available for the Find and Replace command are available here as well. The
  1148. screen will not be updated while a search and apply macro operation is being
  1149. performed. If you need to stop it, use the Abort command (<CtrlU>).
  1150.  
  1151. The Search and apply macro command can be invoked inside a macro, making it
  1152. possible to create an almost unlimited array of special commands. Note,
  1153. however, that it may not be invoked recursively. That is, the macro to be
  1154. applied may not itself execute the Search and apply macro command.
  1155.  
  1156. Find next                                        <CtrlL>, <ShF4>
  1157. Repeat the last search operation, if any. If the last search command called
  1158. for a Find pattern operation, the same search string and options will be used
  1159. to repeat it. If it was a Find and replace operation, the replacement string
  1160. will be reused as well. If it was a search and apply macro operation, the
  1161. search string, options, and macro will all be reused. Note that if a search
  1162. and apply macro operation is in progress, the last search operation will
  1163. temporarily be considered Find pattern, to allow the macro to search for a
  1164. second instance of the same string. For example, suppose you wanted to delete
  1165. all text not within single quotes from the following block:
  1166.  
  1167.    'One', abcdefg
  1168.    'Two', hijklmn
  1169.    'Three', opqrstu
  1170.  
  1171. To do this, you could search for a single quote, and then apply the following
  1172. macro to it:
  1173.  
  1174.    <BkSp>        Delete the first '
  1175.    <CtrlL>       Find the second one on the line
  1176.    <Left>        Move cursor over the second '
  1177.    <CtrlQ><Y>    Delete to end of line
  1178.  
  1179. To perform this operation on the entire block, you would specify "LN" as your
  1180. search options.
  1181.  
  1182.  
  1183. File Commands
  1184. ------------------------------------------------------------------------------
  1185.  
  1186. Edit another file                                <AltF3>
  1187. Load a new file into the current window. If the file being edited has been
  1188. modified, you'll be asked to confirm that you wish to abandon it.
  1189.  
  1190. Edit file from reload list                       <ShF3>
  1191. Load a new file, selected from the reload list, into the current window. If
  1192. the file being edited has been modified, you'll be asked to confirm that you
  1193. wish to abandon it.
  1194.  
  1195. Save and continue edit                           <CtrlK><S>, <F2>
  1196. Save the current file and continue editing.
  1197.  
  1198. Abandon file                                     <CtrlK><Q>, <AltF2>
  1199. Abandon the current file and close its window. If the file has been modified,
  1200. and it is not being edited in another window, you will be asked to confirm
  1201. this request.
  1202.  
  1203. Abandon all and exit to DOS                      *none*
  1204. Abandon all files and exit to DOS. If any of the files in memory have been
  1205. modified, you will be asked if you want to save them.
  1206.  
  1207. Save and exit to DOS                             <CtrlK><X>, <CtrlF2>
  1208. Save the current file and close its window. If the current window is the only
  1209. window, this command exits to DOS.
  1210.  
  1211. Save all and exit to DOS                         <AltX>
  1212. Save all modified files and exit to DOS.
  1213.  
  1214. Save all and continue                            <ShF2>
  1215. Save all modified files and continue editing. This command is especially
  1216. useful in macros that execute other programs.
  1217.  
  1218. Save/switch files                                <CtrlK><D>
  1219. Save the current file and load a new one into the current window.
  1220.  
  1221. Write to named file                              <CtrlK><N>
  1222. Save the current file under a new name.
  1223.  
  1224. Read block                                       <CtrlK><R>, <AltF10>
  1225. Reads a file into the window at the current position of the cursor and marks
  1226. it as a block.
  1227.  
  1228. Write block                                      <CtrlK><W>, <F10>
  1229. Writes the currently marked block to a file. You are first prompted for a
  1230. filename. If the file already exists, you are asked if you want to append the
  1231. block to the file or to overwrite it; if it does not exist, a new file is
  1232. created. The block is left unchanged, and the block markers remain in place.
  1233. If no block is marked, this command is ignored.
  1234.  
  1235.  
  1236. Window Commands
  1237. ------------------------------------------------------------------------------
  1238.  
  1239. Add window                                       <CtrlO><A>, <AltW>
  1240. Opens another text window. You will be prompted for a file to edit; if none is
  1241. specified, a "NONAME" file is created, which you may later save as a named
  1242. file using any of the Save file commands described above. If too many windows
  1243. are open, you will get an error message. If you enter the name of a file
  1244. already being edited, the new window will allow you to view a different
  1245. section of the file than is displayed in the first window.
  1246.  
  1247. Add window from reload list                      <^F3>
  1248. This command is largely identical to the Add window command, but instead of
  1249. being prompted for a file to edit you are asked to pick a file from the reload
  1250. list.
  1251.  
  1252. Previous window                                  <CtrlO><P>, <ShF1>
  1253. Makes the previous text window the current window.
  1254.  
  1255. Next window                                      <CtrlO><N>, <AltF1>
  1256. Makes the next text window the current window.
  1257.  
  1258. Resize current window                            <CtrlO><S>
  1259. Allows you to change the size of the current window. You adjust the size by
  1260. pressing the up and down cursor keys. When you are finished, pressing <Enter>
  1261. or <Esc> returns you to the editor.
  1262.  
  1263. Zoom current window                              <CtrlO><Z>, <AltZ>
  1264. Zooms the current window to fill the entire screen, hiding the other text
  1265. windows. When a window has been zoomed, "»ZOOM«" will appear at the top right
  1266. corner of the status line. If you change windows while zoomed, the window you
  1267. change to will be zoomed as well. If only one window is open at the time this
  1268. command is given, the command does nothing except request that the next window
  1269. opened should be zoomed.
  1270.  
  1271.  
  1272. Block Commands
  1273. ------------------------------------------------------------------------------
  1274.  
  1275. Begin block                                      <CtrlK><B>, <F7>
  1276. Marks the beginning of a block. The marker itself is not visible on the
  1277. screen, and the block becomes visible only when the end block marker is set.
  1278. You may also use the begin block marker as an extra text marker and jump
  1279. directly to it with the Top of block command.
  1280.  
  1281. End block                                        <CtrlK><K>, <F8>
  1282. Marks the end of a block. Like the begin block marker, the end block marker
  1283. is invisible, and the block itself will not be displayed unless both markers
  1284. are set. You may also use the end block marker as an extra text marker
  1285. and jump directly to it with the Bottom of block command.
  1286.  
  1287. Top of block                                     <CtrlQ><B>
  1288. Moves the cursor to the position of the block begin marker. The command works
  1289. even if the block is hidden or the block end marker is not set.
  1290.  
  1291. Bottom of block                                  <CtrlQ><K>
  1292. Moves the cursor to the position of the block end marker. The command works
  1293. even if the block is hidden or the block begin marker is not set.
  1294.  
  1295. Copy block                                       <CtrlK><C>, <AltF7>
  1296. Copy the currently marked and displayed block to the position of the cursor.
  1297. The block markers are placed around the new copy of the block.
  1298.  
  1299. Move block                                       <CtrlK><V>, <AltF8>
  1300. Move the currently marked and displayed block to the position of the cursor.
  1301. The block markers remain around the block at its new position.
  1302.  
  1303. Delete block                                     <CtrlK><Y>
  1304. Delete the currently marked and displayed block. Although the Undo command can
  1305. usually restore portions of an accidentally deleted block, there is no command
  1306. to restore a deleted block in its entirety, so you should use this command
  1307. with care.
  1308.  
  1309. Toggle block display                             <CtrlK><H>
  1310. Toggle the display of marked blocks. Note that several of the other block
  1311. commands do nothing or generate error messages if a marked block is not
  1312. displayed.
  1313.  
  1314. Mark current word                                <CtrlK><T>
  1315. Mark the current word as a block. See the description of the Word left command
  1316. for a definition of "word."
  1317.  
  1318. Indent block                                     <CtrlK><I>
  1319. Indent all lines in the currently marked and displayed block by a fixed number
  1320. of spaces. The default indention level of 2 may be changed using either
  1321. TINSTALL or the Set indentation level command. The cursor must be within the
  1322. block when the command is issued.
  1323.  
  1324. Unindent block                                   <CtrlK><U>
  1325. Unindent all lines in the currently marked and displayed block by a fixed
  1326. number of spaces (default is 2). Note that this command will not delete any
  1327. non-blank characters at the beginning of a line. The cursor must be within the
  1328. block when the command is issued.
  1329.  
  1330. Increment marked block                           <^K><^G>
  1331. Decrement marked block                           <^K><^L>
  1332. These two commands are somewhat similar to the Upper case, Lower case, and
  1333. Toggle case commands. If the cursor is not within a marked and displayed
  1334. block, they increment or decrement the value of the character at the cursor,
  1335. provided that it is not a space. If the cursor is within a block, the contents
  1336. of that block are examined. If the block is all on one line *and* the string
  1337. of characters within the block is a valid integer number in decimal format
  1338. within the range -MaxLongInt..MaxLongInt, the command will increment or
  1339. decrement that number. For example, if the block consists of "10", " 10", or
  1340. "010", and the Increment marked block command were given, the block would be
  1341. changed to "11", " 11", or "011" respectively. If the block is not on one
  1342. line, or if the contents of the block is not a valid number, each non-blank
  1343. character in the block will be incremented/decremented. For example, "BCDE"
  1344. would become "CDEF"/"ABCD".
  1345.  
  1346. One obvious use for these commands is to construct a macro such as the
  1347. following:
  1348.  
  1349.      <CtrlK><CtrlT>    Mark the current word as a block
  1350.      <CtrlK><CtrlG>    Increment the value of the block
  1351.      <Down>            Move the cursor to the next line
  1352.      <AltS><AltA>      Abort the macro if the new line is empty
  1353.      <AltS><AltR>      Repeat this macro
  1354.  
  1355. Assuming that the cursor were at the top of a column of numbers (a series of
  1356. constant declarations, for example), this macro would increment each number in
  1357. the column until it reached a blank line.
  1358.  
  1359.      Before         After
  1360.      ------        -------
  1361.        "99"          "100"
  1362.       " 99"         "100"
  1363.      "  99"        " 100"
  1364.      "0100"        "0101"
  1365.      "0101"        "0102"
  1366.      "0102"        "0103"
  1367.  
  1368. As you can see, it is acceptable for numbers to be left-padded with either
  1369. zeros or spaces. If the number after incrementing is wider than it was before,
  1370. all text to the right of the number will be pushed forward to make room.
  1371.  
  1372. Align block                                      <CtrlK><A>
  1373. Aligns all lines in the currently marked and displayed block with the first
  1374. line. For example, if the first non-blank character in the first line is at
  1375. column 5, the text in the remaining lines in the block will be adjusted so
  1376. that the first non-blank character in each line is at column 5. The cursor
  1377. must be within the block when the command is issued.
  1378.  
  1379. Reformat block                                   <CtrlK><F>
  1380. Reformats all paragraphs completely contained within the currently marked and
  1381. displayed block. Note that this command does nothing if word wrap is off.
  1382.  
  1383.  
  1384. Printing Commands
  1385. ------------------------------------------------------------------------------
  1386.  
  1387. Print current file                               <AltK><AltP>
  1388. Prints the current file in its entirety by writing it to the default printer
  1389. device (LPT1). You can change the default printer device using TINSTALL if
  1390. LPT1 is inappropriate for your system. (The other choices are LPT2, LPT3,
  1391. COM1, and COM2.) By default, TPE will send a formfeed (^L^M) to the printer at
  1392. the end of a print job, but you may disable this behavior using TINSTALL if
  1393. you wish.
  1394.  
  1395. Print block                                      <CtrlK><P>
  1396. Writes the currently marked and displayed block to the default printer device.
  1397. By default, TPE will send a formfeed to the printer at the end of the print
  1398. job.
  1399.  
  1400.  
  1401. Text Marker Commands
  1402. ------------------------------------------------------------------------------
  1403.  
  1404. Toggle marker display                            <CtrlK><M>
  1405. Toggle the display of text markers.
  1406.  
  1407. Set marker 0..9                                  <CtrlK><0>..<CtrlK><9>
  1408. Sets one of the ten text markers at the position of the cursor. <CtrlK><0>
  1409. sets marker 0, <CtrlK><1> sets marker 1, etc.
  1410.  
  1411. Jump marker 0..9                                 <CtrlQ><0>..<CtrlQ><9>
  1412. Moves the cursor to the specified text marker. <CtrlQ><0> jumps to marker 0,
  1413. <CtrlQ><1> jumps to marker 1, etc.
  1414.  
  1415.  
  1416. Macro Commands
  1417. ------------------------------------------------------------------------------
  1418.  
  1419. Toggle macro record                              <CtrlJ><T>
  1420. Turns macro recording on or off. When macro recording is on, all subsequent
  1421. keystrokes (up to the 255-keystroke limit) are saved in the scrap macro until
  1422. macro recording is turned off again. (Keystrokes used to turn it on and off
  1423. are not saved.) Once the macro is recorded, you are asked to select a macro
  1424. "slot" to store it in.
  1425.  
  1426. Edit macro                                       <AltS><AltM>
  1427. Edit an existing macro. In the macro editor, special keys (function keys,
  1428. cursor keys, etc.) are represented by abbreviated forms of their names--for
  1429. example, <Esc><CtrlN><Enter>--and these symbols are highlighted. Regular
  1430. keystrokes are shown as normal characters, without highlighting. When you
  1431. issue this command, you are asked to select a macro to edit, then to enter a
  1432. name for the macro (optional). Then you enter the macro editor itself. Several
  1433. keys serve special purposes here: the cursor keys behave as usual, moving the
  1434. cursor so you can select a particular keystroke to change; <BkSp> deletes a
  1435. single keystroke, just as it does in the regular editor; <CtrlBkSp> deletes an
  1436. entire macro; <Enter> accepts the macro. The <ScrollLock> key acts as a
  1437. toggle, turning literal interpretation of keystrokes on and off. For example,
  1438. if you wanted to insert the <Enter> key or the <BkSp> key into the macro, you
  1439. would first press <ScrollLock>. Pressing it again would restore all special
  1440. keys to their normal functions. The bottom right corner of the macro editor
  1441. window indicates whether the editor is in Command mode or Literal mode.
  1442.  
  1443. Load macros from disk                            <AltS><AltL>
  1444. Allows you to load a file of previously saved macros. If the file you specify
  1445. does not exist, an error message is displayed.
  1446.  
  1447. Write macros to disk                             <AltS><AltW>
  1448. Saves the current macros to the file you specify.
  1449.  
  1450. Playback macro by menu                           <AltT><AltM>
  1451. Displays a list of the currently defined macros. To play one of them back,
  1452. move the highlight over the appropriate menu item and press <Enter>. Press
  1453. <Esc> instead if you do not wish to playback a macro.
  1454.  
  1455. Playback macro 1..9                              <Alt1>..<Alt9>
  1456. Plays back the specified macro one time. <Alt1> plays back macro 1, <Alt2>
  1457. macro 2, and so on.
  1458.  
  1459. Playback scrap macro                             <CtrlJ><I>
  1460. Plays back the scrap macro (macro 0) a specified number of times. The scrap
  1461. macro is always the same as the last macro that was recorded, even if that
  1462. macro was saved as a normal macro (1-9). Note that the limit on the number of
  1463. times that the macro can be played back depends on the length of the macro (if
  1464. nothing else is in the keyboard buffer, the limit is '512 div Length(Macro)').
  1465.  
  1466. Playback scrap macro 1..9 time(s)                <CtrlJ><1>..<CtrlJ><9>
  1467. Plays back the scrap macro 1 to 9 times. <CtrlJ><1> plays it back once,
  1468. <CtrlJ><2> twice, and so on.
  1469.  
  1470.  
  1471. Special Commands for Use in Macros
  1472. ------------------------------------------------------------------------------
  1473.  
  1474. Force insert mode                                <AltF><AltI>
  1475. Forces insert mode on.
  1476.  
  1477. Force overtype mode                              <AltF><AltO>
  1478. Forces insert mode off.
  1479.  
  1480. Force autoindent mode                            <AltF><AltA>
  1481. Forces autoindent mode on.
  1482.  
  1483. Force word wrap on                               <AltF><AltW>
  1484. Forces word wrap mode on.
  1485.  
  1486. Abort macro if line empty                        <AltS><AltA>
  1487. Aborts the macro if the current line is empty.
  1488.  
  1489. Abort macro if end of file                       <AltS><AltF>
  1490. Aborts the macro if the cursor is at the first *or* last line of the file.
  1491.  
  1492. Abort macro if out of block                      <AltS><AltK>
  1493. Aborts the macro if the cursor is not within the currently marked block.
  1494.  
  1495. Repeat last macro                                <AltS><AltR>
  1496. Repeats the last macro. This command should generally be used only at the end
  1497. of a macro that is designed to be self-repeating *and* self-aborting. For
  1498. example, you might have a macro such as the following:
  1499.  
  1500.    <AltS><AltK>      Abort macro if cursor is not in the marked block
  1501.    <Home><Del><Del>  Delete two spaces at the start of the current line
  1502.    <Down>            Move the cursor to the next line
  1503.    <AltS><AltR>      Repeat last macro--i.e., this macro
  1504.  
  1505. (This macro is taken from the default macro file, TPE.MAC, where it
  1506. is assigned to <Alt2>. See the discussion of The Standard Macro File, below.)
  1507.  
  1508. The macro works something like this:
  1509.  
  1510.    while CursorInMarkedBlock do begin  { <AltS><AltK> }
  1511.      HomeTheCursor;                    { <Home> }
  1512.      DeleteOneChar;                    { <Del> }
  1513.      DeleteOneChar;                    { <Del> }
  1514.      CursorDown;                       { <Down> }
  1515.    end;                                { <AltS><AltR> }
  1516.  
  1517. The conditional test for aborting the macro should generally appear at the
  1518. beginning of the macro or just prior to the Repeat last macro command. If the
  1519. test is at the beginning, the macro will work like a "while" loop, meaning
  1520. that it will never be executed if the condition isn't met initially. If it is
  1521. just before the end, it will work like a "repeat..until" loop, meaning that
  1522. the first part of the macro will always be executed once:
  1523.  
  1524.    repeat
  1525.      HomeTheCursor;                    { <Home> }
  1526.      DeleteOneChar;                    { <Del> }
  1527.      DeleteOneChar;                    { <Del> }
  1528.      CursorDown;                       { <Down> }
  1529.      if not CursorInMarkedBlock then   { <AltS><AltK> }
  1530.        Exit;
  1531.    until False;                        { <AltS><AltR> }
  1532.  
  1533. Note that it is possible to record a macro that contains the Repeat last macro
  1534. command. However, TPE will automatically terminate the recording session as
  1535. soon as the command is issued, rather than actually repeating the macro. The
  1536. Repeat last macro command will then represent the last command in the recorded
  1537. macro.
  1538.  
  1539.  
  1540. Text Formatting Commands
  1541. ------------------------------------------------------------------------------
  1542.  
  1543. Reformat paragraph                               <CtrlB>
  1544. Rearranges words from the current line to the end of the paragraph such that
  1545. the lines are as full as possible, given the constraints imposed by the left
  1546. and right margins. The end of a paragraph is signaled by a blank line. This
  1547. command is available only when word wrap is on.
  1548.  
  1549. Center line                                      <CtrlO><C>
  1550. Centers the current line within the left and right margins.
  1551.  
  1552. Upper case                                       <CtrlO><U>
  1553. Convert all characters in the currently marked and displayed block to upper
  1554. case. If the cursor is not within a marked and displayed block, the character
  1555. at the cursor is converted to upper case.
  1556.  
  1557. Lower case                                       <CtrlO><V>
  1558. Convert all characters in the currently marked and displayed block to lower
  1559. case. If the cursor is not within a marked and displayed block, the character
  1560. at the cursor is converted to lower case.
  1561.  
  1562. Toggle case                                      <CtrlO><O>
  1563. Toggle the case of all characters in the currently marked and displayed block.
  1564. If the cursor is not within a marked and displayed block, the case of the
  1565. character at the cursor is toggled.
  1566.  
  1567.  
  1568. Mode Toggle Commands
  1569. ------------------------------------------------------------------------------
  1570.  
  1571. Toggle insert mode                               <Ins>, <CtrlV>
  1572. Toggle insert mode on or off. A fat cursor indicates insert mode; a thin
  1573. cursor indicates overtype mode. (If a solid block cursor is in use, only the
  1574. status line will indicate whether you are in insert or overtype mode.)
  1575.  
  1576. Toggle autoindent mode                           <CtrlQ><I>
  1577. Toggle autoindent mode on or off. In autoindent mode, pressing <Enter> while
  1578. in insert mode will cause the new line inserted to have the same indentation
  1579. level as the previous line. Autoindent mode also affects the way that text is
  1580. formatted when word wrap occurs--the new line will have the same indentation
  1581. level as the previous line--and hence the behavior of the reformatting
  1582. commands.
  1583.  
  1584. Toggle word wrap                                 <CtrlO><W>
  1585. Toggle word wrap on or off. When word wrap is on, any attempt to insert or
  1586. append text beyond the right margin will cause a new line to be inserted
  1587. following the current line and all words that are at least partially beyond
  1588. the right margin to be moved to the new line.
  1589.  
  1590. Toggle compress at wrap                          <AltT><AltC>
  1591. This option, which is on by default, tells TPE to compress excess white space
  1592. out of a line before trying to word wrap it. For example,
  1593.  
  1594.    this      is      a       test
  1595.  
  1596. would become
  1597.  
  1598.    this is a test
  1599.  
  1600. after compression. Leading white space is never removed. Note that this
  1601. setting also affects the behavior of the reformatting commands.
  1602.  
  1603. Toggle synchronized scroll                       <AltS><AltS>
  1604. When synchronized scrolling is on, all cursor movement commands are passed to
  1605. all visible windows on the screen for processing. This option is especially
  1606. useful when comparing two versions of the same file. Note that many cursor
  1607. movement commands--notably <Up>, <Down>, <Left>, and <Right>--will often have
  1608. no visible effect on windows other than the current one. The effects will be
  1609. visible only if the command causes the window to scroll. Note too that certain
  1610. commmands--such as <End>, <CtrlLeft>, and <CtrlRight>--may have slightly
  1611. different effects in different windows. Synchronized scrolling is temporarily
  1612. disabled when the current window is zoomed.
  1613.  
  1614.  
  1615. Commands for Controlling Text Formatting
  1616. ------------------------------------------------------------------------------
  1617.  
  1618. Set left margin                                  <CtrlO><L>
  1619. Set the left margin for text displayed on the screen. The default left margin
  1620. of 1 may be changed with TINSTALL.
  1621.  
  1622. Set right margin                                 <CtrlO><R>
  1623. Set the right margin for text displayed on the screen. The default right
  1624. margin of 78 may be changed with TINSTALL.
  1625.  
  1626. Set indentation level                            <CtrlO><B>
  1627. Set the indentation level for marked blocks. This setting affects the behavior
  1628. of the Indent block and Unindent block commands. The default indentation level
  1629. of 2 may be changed with TINSTALL.
  1630.  
  1631.  
  1632. Screen Toggle Commands
  1633. ------------------------------------------------------------------------------
  1634.  
  1635. Toggle 43-/50-line mode                          <AltT><AltE>
  1636. Activates/deactivates the 43-line mode on EGA's or the 50-line mode on VGA's.
  1637. Note that TPE will restore the mode that the system was in initially before
  1638. exiting to DOS or executing another program.
  1639.  
  1640. Toggle user-defined mode                         <AltT><AltU>
  1641. Activates/deactivates the user-defined video mode if one was specified with
  1642. TINSTALL. If none was specified, this command does nothing.
  1643.  
  1644. Toggle line-drawing mode                         <AltL>
  1645. This command lets you activate/deactivate one of TPE's four line-drawing
  1646. modes. In a line-drawing mode, pressing <Left>, <Right>, <Up>, or <Down> will
  1647. cause an appropriate line-drawing character to be placed at the position of
  1648. the cursor, overwriting the character beneath the cursor, if any. The cursor
  1649. will then be moved in the direction indicated, if appropriate. Note that, when
  1650. line-drawing characters are being inserted, the current margins are ignored,
  1651. as are the states of the autoindent, word wrap, and insert mode toggles.
  1652.  
  1653. By default, TPE runs in "edit mode," in which the four cursor keys simply move
  1654. the cursor. Pressing <AltL> repeatedly allows you to select one of the four
  1655. line-drawing modes, corresponding to the following sets of characters:
  1656.  
  1657.   ─│┌┐└┘    ═║╔╗╚╝    ─║╓╖╙╜    ═│╒╕╘╛
  1658.  
  1659. Pressing <AltL> a fifth time brings you back to edit mode. You can switch back
  1660. to edit mode immediately by pressing <AltE> (Force edit mode), or you can
  1661. temporarily switch to edit mode by pressing <ScrollLock>. Note that ScrollLock
  1662. is forced off when you give either the <AltL> or the <AltE> command.
  1663.  
  1664. As with other mode toggles, activating a line-drawing mode in the current
  1665. window has no effect on other windows. When one of the line-drawing modes is
  1666. in effect for a given window, the left side of its status line is used to
  1667. display the corresponding character set. If ScrollLock is active, however, and
  1668. that window is the current window, 'ScLock' is displayed there instead to
  1669. remind you that the line-drawing mode has been temporarily overridden. If the
  1670. window is in edit mode, that portion of the status line is used to display the
  1671. '»SAVE«' reminder, as usual.
  1672.  
  1673. Force edit mode                                  <AltE>
  1674. Forces a return to edit mode.
  1675.  
  1676. Toggle snow check                                <AltT><AltS>
  1677. Turns snow checking on or off. Since snow checking is needed only for older
  1678. CGA adapters, TPE will ignore this command if the current display is not a
  1679. CGA.
  1680.  
  1681. Toggle block cursor                              <AltT><AltB>
  1682. Hides the blinking cursor you normally see on the screen and replaces it with
  1683. a solid, non-blinking "block cursor". You can change the appearance of the
  1684. block cursor with TINSTALL. The blinking cursor is restored when you exit from
  1685. TPE or when you execute another program.
  1686.  
  1687. Toggle initial zoom                              <AltT><AltZ>
  1688. If the initial zoom option is in effect (it is off by default), new windows
  1689. will automatically be zoomed when they are first opened.
  1690.  
  1691.  
  1692. Program Configuration Commands
  1693. ------------------------------------------------------------------------------
  1694.  
  1695. Set support path                                 <AltS><AltP>
  1696. The support path is the drive:\directory where TPE looks for its help file
  1697. (TPE.HLP) and the standard macro file (TPE.MAC).
  1698.  
  1699. Set default extension                            <AltS><AltE>
  1700. Used to specify the default extension for filenames. This extension is
  1701. automatically added to filenames lacking extensions. For example, if you have
  1702. set the default extension to "PAS" (the default setting) and wish TPE to load
  1703. "MYPROG.PAS" when the program starts, you can enter
  1704.  
  1705.      tpe myprog
  1706.  
  1707. at the command line. Note that you must issue the Save defaults command if you
  1708. want to make this setting permanent.
  1709.  
  1710. Save defaults                                    <AltS><AltD>
  1711. Allows you to save the current configuration settings as the defaults. If TPE
  1712. found TPE.CFG when it first loaded, that copy of TPE.CFG will be overwritten
  1713. with the new settings. If TPE.CFG was not found initially, a new TPE.CFG file
  1714. will be created in the current directory. This command is of little use if
  1715. you've selected the option to automatically save the configuration data on
  1716. exit.
  1717.  
  1718.  
  1719. Miscellaneous Commands
  1720. ------------------------------------------------------------------------------
  1721.  
  1722. Show system info                                 <CtrlJ><V>, <AltI>
  1723. Shows you a variety of statistics about the file in the current window, as
  1724. well as certain "system information": the version of TPE in use; the full
  1725. pathname of the file being edited; the number of lines, bytes, and words in
  1726. the file; the amount of RAM and (if appropriate) virtual memory remaining; the
  1727. current drive and directory; and the amount of space remaining on the current
  1728. drive.
  1729.  
  1730. Show available memory                            <CtrlJ><R>, <AltM>
  1731. Displays the amount of virtual memory available within the editor.
  1732.  
  1733. Invoke DOS shell                                 <CtrlJ><O>, <AltD>
  1734. This command gives you access to DOS services or to other programs from within
  1735. TPE. You will be prompted for the name of a program or a DOS command to be
  1736. executed. If you need to run several programs, you can invoke a DOS "shell"
  1737. simply by leaving the command string blank and pressing <Enter>. To return to
  1738. TPE from a DOS shell, enter "EXIT" at the DOS command line.
  1739.  
  1740. As mentioned elsewhere, one of the nicest features of TPE is its ability to
  1741. swap itself almost entirely out of memory before executing other programs.
  1742. Only a tiny kernel of about 4K remains in memory; the rest of the program is
  1743. swapped to disk, EMS, or XMS.
  1744.  
  1745. Note that you cannot load a second copy of TPE while you are shelled out to
  1746. DOS. If you try to do so, TPE will abort with the message "TPE is already
  1747. loaded."
  1748.  
  1749. One other special note about this command. TPE analyzes the command line you
  1750. specify and replaces each instance of "%p%" with the full pathname of the
  1751. primary file. (See the next section of the documentation.) For example, if the
  1752. primary file is "C:\PAS\MYPROG.PAS", then "tpc %p%" would be treated as
  1753. equivalent to "tpc C:\PAS\MYPROG.PAS". Note that there may be more than one
  1754. instance of "%p%" in the command string. This feature makes it possible to
  1755. create a macro that executes a utility program and automatically passes it the
  1756. name of the primary file. For example, the macro "<ShF2><AltD>psa %p%<Enter>"
  1757. would save all modified files and then execute the PSA program from Turbo
  1758. Analyst, passing it the name of the primary file as a parameter.
  1759.  
  1760. Similarly, "%x%" may be used to represent the name of the executable file
  1761. associated with the primary file. For example, if the primary file is
  1762. "C:\PAS\MYPROG.PAS" and the default extension for executables is "EXE", then
  1763. "tprof %x%" would be treated as equivalent to "tprof C:\PAS\MYPROG.EXE".
  1764.  
  1765. Log drive/path                                   <CtrlJ><D>, <AltP>
  1766. Allows you to change the active drive and directory. You may enter a drive and
  1767. path, or you can specify a "file mask" and choose a new path from a directory
  1768. listing. For example, entering
  1769.  
  1770.      C:\*.*
  1771.  
  1772. would show you a list of all the subdirectories that branch out of the root
  1773. directory on drive C. When the name of the directory you want is displayed at
  1774. the top of the window, press <Esc> to make it the current directory.
  1775.  
  1776. Abort                                            <CtrlU>
  1777. Used to halt an operation in progress. The keyboard buffer is checked
  1778. regularly to see if the abort command has been issued; if it has, the buffer
  1779. is emptied and the operation is stopped.
  1780.  
  1781. Load help file                                   <F1>
  1782. This command tells TPE to load the help file (TPE.HLP) created by TINSTALL. If
  1783. the file is found on the support path, and there are fewer than 8 windows
  1784. open, TPE will open a new window, load TPE.HLP into it, and then zoom the
  1785. window. There is nothing special about the help file. It is an ordinary ASCII
  1786. text file, and you may do anything with it that you could do with any other
  1787. file (perform searches, edit it, etc.).
  1788.  
  1789. Display user screen                              <AltF5>
  1790. This command displays the contents of "the user screen"--the screen that was
  1791. active when TPE first started. If any other programs have been executed while
  1792. within TPE, the output of those programs can be viewed using this command.
  1793. Press any key to return to the TPE screen.
  1794.  
  1795.  
  1796. Commands for Executing a Program
  1797. ------------------------------------------------------------------------------
  1798.  
  1799. Set primary file                                 <AltC><AltP>
  1800. This command lets you specify the name of the "primary file," usually the main
  1801. source file for the program you are working on in the editor.
  1802.  
  1803. Reset primary file                               <AltC><AltR>
  1804. This command makes the file in the current window the primary file.
  1805.  
  1806. Execute primary file                             <CtrlF9>, <AltR>
  1807. This command executes the program corresponding to the primary file. When
  1808. searching for the program to be executed, TPE will apply the default extension
  1809. for executables to the name of the primary file (see the Set extension for
  1810. executables command). It will look for the file first in the current directory
  1811. and then on the DOS path. If it is unable to locate the program, you will be
  1812. asked to enter its name. If the Confirmation of parameters option is On, as it
  1813. is by default, you will be given an opportunity to edit the command line to be
  1814. passed to the program before it is executed. (The state of this option may be
  1815. changed using the Toggle confirmation of parameters command.)
  1816.  
  1817. Set extension for executables                    <AltC><AltE>
  1818. Lets you specify the default extension to be applied to the name of an
  1819. executable program. The default setting of "EXE" should be left alone unless
  1820. you are compiling/running/debugging a program that compiles to a COM file.
  1821.  
  1822. Set default parameters                           <AltC><AltS>
  1823. Lets you specify a list of parameters to be passed to a program when the
  1824. Execute primary file or Debug primary file commands are issued.
  1825.  
  1826. Toggle confirmation of parameters                <AltC><AltT>
  1827. This command toggles the option that determines whether or not you will be
  1828. asked to confirm the command line to be passed to a program being executed.
  1829. This option is On by default, unless you have changed the default setting with
  1830. TINSTALL. Note that this setting also applies to the compiler, assembler, and
  1831. debugger.
  1832.  
  1833.  
  1834. Commands for Compiling Programs
  1835. ------------------------------------------------------------------------------
  1836.  
  1837. Select compiler                                  <ShF5>
  1838. This command allows you to change the current compiler, assuming that you have
  1839. configured TPE for use with multiple compilers. The abbreviation for the
  1840. currently selected compiler will appear on the status lines for all visible
  1841. windows. Note that, unlike TINSTALL, TPE will not allow you to select a given
  1842. compiler unless it has a 1- to 4-character abbreviation.
  1843.  
  1844. Compile w/ primary options                       <F9>
  1845. This command compiles the primary file using the current compiler and its
  1846. primary compiler options. Normally this command is used to compile a program
  1847. *without* debug information. If the Confirmation of parameters option is On,
  1848. as it is by default, you will be given an opportunity to edit the command line
  1849. to be passed to the compiler before it is executed.
  1850.  
  1851. Compile w/ secondary options                     <AltF9>
  1852. This command compiles the primary file using the current compiler and its
  1853. secondary compiler options. Normally this command is used to compile a program
  1854. *with* debug information, in preparation for running it in the debugger. If
  1855. the Confirmation of parameters option is On, as it is by default, you will be
  1856. given an opportunity to edit the command line to be passed to the compiler
  1857. before it is executed.
  1858.  
  1859. Set path to compiler                             <AltC><AltN>
  1860. Lets you specify the complete pathname of the current compiler. Note that TPE
  1861. will automatically use the first four letters of the compiler's name as its
  1862. abbreviation. For example, if you set the path to the current compiler to
  1863. 'C:\BC\BIN\BCCX.EXE', TPE will set the compiler's abbreviation to 'BCCX'.
  1864.  
  1865. Set primary compiler options                     <AltC><AltO>
  1866. Lets you specify the command line options to be passed to the current compiler
  1867. when you issue the Compile w/ primary options command.
  1868.  
  1869. Set secondary compiler options                   <AltC><Alt2>
  1870. Lets you specify the command line options to be passed to the current compiler
  1871. when you issue the Compile w/ secondary options command.
  1872.  
  1873.  
  1874. Commands for Assembling Programs
  1875. ------------------------------------------------------------------------------
  1876.  
  1877. Assemble file                                    <AltA>
  1878. This command assembles either the file in the current window (default) or the
  1879. primary file, depending on how TPE is configured. If the Confirmation of
  1880. parameters option is On, as it is by default, you will be given an opportunity
  1881. to edit the command line to be passed to the assembler before it is executed.
  1882.  
  1883. Set path to assembler                            <AltC><AltA>
  1884. Lets you specify the complete pathname of the assembler.
  1885.  
  1886. Set assembler options                            <AltC><AltC>
  1887. Lets you specify the command line options to be passed to the assembler when
  1888. you issue the Assemble file command.
  1889.  
  1890.  
  1891. Commands for Debugging Programs
  1892. ------------------------------------------------------------------------------
  1893.  
  1894. Debug primary file                               <ShF9>
  1895. This command invokes the debugger, passing it any command-line options
  1896. specified with the Set debugger options command, followed by the name of the
  1897. primary file (after applying the default extension for executables to the
  1898. filename), plus any command line options you have specified with the Set
  1899. default parameters command. If the Confirmation of parameters option is On, as
  1900. it is by default, you will be given an opportunity to edit the command line to
  1901. be passed to the debugger before it is executed.
  1902.  
  1903. Set path to debugger                             <AltC><AltD>
  1904. Lets you specify the complete pathname of the debugger.
  1905.  
  1906. Set debugger options                             <AltC><AltG>
  1907. Lets you specify the command line options to be passed to the debugger when
  1908. you issue the Debug primary file command.
  1909.  
  1910.  
  1911. The Standard Macro File: TPE.MAC
  1912. ------------------------------------------------------------------------------
  1913.  
  1914. When TPE first starts, it looks for a macro file called TPE.MAC. It looks for
  1915. this file first in the current directory and then in TPE's support path
  1916. directory (set with TINSTALL). In the typical case, you will have only one
  1917. file called TPE.MAC, located in your support path. However, if you wish you
  1918. may have multiple files of that name for use on different projects. Just keep
  1919. in mind that TPE will look only in the current directory for a
  1920. project-specific macro file.
  1921.  
  1922. In any case, if a file called TPE.MAC is found, the macros are loaded and
  1923. effectively become part of the TPE command set. We have provided a file by
  1924. this name containing the macros we routinely use. You may edit these macros,
  1925. add new ones, or replace the file entirely.
  1926.  
  1927. The standard macros in TPE.MAC are as follows:
  1928.  
  1929. 0 Scrap
  1930.     This macro is reserved for recording purposes, and is never saved by the
  1931.     Write macro file command. Hence it is always empty when TPE starts.
  1932.  
  1933. 1 Destructive unindent
  1934.     This macro deletes two characters at the beginning of each line in the
  1935.     currently marked block.
  1936.  
  1937. 2 Destructive unindent one
  1938.     This macro is chained to by macro 1. It deletes two characters at the
  1939.     beginning of each line in the currently marked block, starting at the
  1940.     current line.
  1941.  
  1942. 3 Procedure shell
  1943.     This macro constructs a "shell" for a procedure:
  1944.  
  1945.        procedure ;
  1946.          {-}
  1947.        begin
  1948.        end;
  1949.  
  1950.     Like all the "shell" macros, it forces insert and autoindent modes on.
  1951.  
  1952. 4 Function shell
  1953.     Constructs a "shell" for a function:
  1954.  
  1955.        function :;
  1956.          {-}
  1957.        begin
  1958.        end;
  1959.  
  1960. 5 Program shell
  1961.     Constructs a "shell" for a program:
  1962.  
  1963.        program ;
  1964.          {-}
  1965.        uses ;
  1966.        type
  1967.        const
  1968.        var
  1969.        begin
  1970.        end.
  1971.  
  1972. 6 Unused
  1973.  
  1974. 7 Unit shell
  1975.     Constructs a "shell" for a unit:
  1976.  
  1977.        unit ;
  1978.          {-}
  1979.        interface
  1980.        uses ;
  1981.        implementation
  1982.        {begin}
  1983.        end.
  1984.  
  1985. 8 Indent marked block
  1986.     Simply executes the indent marked block command (<CtrlK><CtrlI>). A
  1987.     holdover from the days before there was such a command.
  1988.  
  1989. 9 Unindent marked block
  1990.     Executes the unindent marked block command (<CtrlK><CtrlU>). Another
  1991.     holdover.
  1992.  
  1993. Even if you don't have any use for the macros themselves, you will probably
  1994. want to study them when you start writing your own.
  1995.  
  1996.  
  1997. TPE's Virtual Memory Manager
  1998. ------------------------------------------------------------------------------
  1999.  
  2000. TPE uses a virtual memory manager that allows it to store text being edited in
  2001. "virtual memory," which can be either RAM, EMS, XMS, or disk. By default, TPE
  2002. uses normal RAM, but you can select one of the other sources of memory either
  2003. by changing the default setting with TINSTALL or by passing the appropriate
  2004. command line parameter to TPE when you go to run it: /E for EMS, /X for XMS,
  2005. /D for disk, or /N for normal RAM. If the desired source of virtual memory is
  2006. not available, or is too limited to be of use, TPE will display an error
  2007. message when it starts and use normal RAM instead.
  2008.  
  2009. Note that TPE does not store all its data in virtual memory; many things are
  2010. always stored in normal RAM. In particular, TPE allocates a single 16-byte
  2011. data structure in RAM for each line in a given file. In addition, when using
  2012. either XMS or disk for virtual memory, TPE also allocates roughly one third of
  2013. available RAM for buffering data stored in virtual memory. Given 600K of
  2014. available RAM, TPE will therefore be able to edit a file of about 27,000 lines
  2015. if using EMS, or 18,000 lines if using XMS or disk. To see how much RAM and
  2016. virtual memory is still available, use the Show system info command
  2017. (<CtrlJ><V> or <AltI>). The Show available memory command (<CtrlJ><R> or
  2018. <AltM>) displays only the amount of virtual memory remaining.
  2019.  
  2020. When TPE runs out of memory, you'll see one of two error messages. If it has
  2021. exhausted the supply of normal RAM, you'll see "Insufficient memory." If it
  2022. runs out of virtual memory, you'll see "Insufficient virtual memory." Please
  2023. keep this distinction in mind. The fact that you have lots of virtual memory
  2024. available doesn't mean that you won't be seeing an "Insufficient memory" error
  2025. message.
  2026.  
  2027. There are two other error messages that you might see in this connection. The
  2028. first is simply a warning message: "Warning! Limited RAM available". This
  2029. message will appear only when EMS, XMS, or disk is being used for virtual
  2030. memory. What it means is that the virtual heap is badly fragmented, and that
  2031. TPE is dangerously close to not having enough memory (RAM) reserved to keep
  2032. track of all the blocks of available virtual memory. If you see this warning,
  2033. the best thing to do is to save your work, exit from TPE, and reload TPE with
  2034. the /A option.
  2035.  
  2036. The second error message is one we hope you'll never see: "Critical error nnn.
  2037. Data may be lost." What this means is that the virtual memory manager has
  2038. encountered an unrecoverable error, and you need to exit immediately. If the
  2039. error number ("nnn") is 204, you're in good shape. That simply means that the
  2040. virtual heap is so badly fragmented that TPE can no longer keep track of all
  2041. the free memory blocks. No data has been lost, but you should save all your
  2042. work and exit immediately. You shouldn't see this message unless you've
  2043. previously seen the warning message described above.
  2044.  
  2045. Any other critical error message is very bad news indeed. It means that an
  2046. I/O error occurred while trying to access the source of virtual memory (a disk
  2047. read error, for example). In all likelihood, at least some of your data has
  2048. been lost. You can try saving your work before exiting, but very likely the
  2049. file will contain garbage or be incomplete.
  2050.  
  2051.  
  2052. Copyright and License Information
  2053. ------------------------------------------------------------------------------
  2054.  
  2055. TPE is copyright (c) 1990-1992 by TurboPower Software. All Rights Reserved.
  2056.  
  2057. Although TPE is copyrighted software, license is hereby granted to distribute
  2058. the program for personal, non-commercial use. You may use the program
  2059. yourself, give it to your friends or co-workers, or distribute it for a
  2060. cost-based fee ($20 or less) as part of a user's group or bulletin board
  2061. service.
  2062.  
  2063. TPE is not shareware: we're not asking for a donation. However, if you request
  2064. that we send you a new version, we'll ask for $20 to cover our time and costs.
  2065. You will receive only a disk containing the latest version of the program. You
  2066. will not receive any printed documentation. The only "manual" for TPE is this
  2067. DOC file.
  2068.  
  2069. Alternatively, the current version of the program may be downloaded from
  2070. our data library on CompuServe, LIB 6 of the PCVENB forum. The name of the
  2071. file to download is TPE.LZH.
  2072.  
  2073. Since TPE is neither commercial software nor shareware, and we are not
  2074. attempting to make any profit from it, we would ask that you please restrain
  2075. your natural urge to suggest enhancements to it. Responding to such requests
  2076. can take lots of time, time that we ought to be spending developing new
  2077. products, enhancing existing ones, and supporting our paying customers. Your
  2078. consideration will be much appreciated.
  2079.  
  2080. On the other hand, please feel free to contact us if you encounter a problem
  2081. with the program. We depend heavily on this program ourselves, and we have a
  2082. vested interest in insuring that it works properly. If you encounter a problem
  2083. with TPE, you may contact Brian Foley at:
  2084.  
  2085.      TurboPower Software
  2086.      P.O. Box 49009
  2087.      Colorado Springs, CO
  2088.      80949-9009
  2089.  
  2090. You can also leave messages in section 6 of the PCVENB forum on CompuServe,
  2091. addressed to Brian Foley [76317,3247].
  2092.